//package com.adopapa.nezhacloud.authc.service;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException;
//import org.springframework.security.core.userdetails.User;
//import org.springframework.security.core.userdetails.UserDetails;
//import org.springframework.security.core.userdetails.UserDetailsService;
//import org.springframework.security.core.userdetails.UsernameNotFoundException;
//import org.springframework.security.crypto.password.PasswordEncoder;
//import org.springframework.stereotype.Service;
//
//import com.adopapa.nezhacloud.authc.domain.UserInfo;
//import com.adopapa.nezhacloud.common.Tools;
//import com.adopapa.nezhacloud.ddd.BaseService;
//
//
///**
// * 
// */
//
//@Service
//public class AuthcUserDetailsService extends BaseService implements UserDetailsService {
//	
//	@Autowired
//	private UserInfoService userInfoService;
//	
//	@Autowired
//	private PasswordEncoder passwordEncoder;
//
//	@Override
//	public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
//		UserInfo userInfo = userInfoService.getUserInfoByLoginName(username);
//		if (Tools.empty(userInfo)) {
//			throw new AuthenticationCredentialsNotFoundException("Not Found");
//		}
//		//
//		return User.withUsername(username).password(userInfo.getLoginPwd())
//				.roles("").authorities("")
//				.build();
//	}
//
//}
